#ifndef CALCENGINE_HPP_
#define CALCENGINE_HPP_

#include <iostream>
#include <sstream>
#include <string>
#include <cstdint>

class CalcEngine{

enum CalcReturnCodes{
	OVERFLOW_ERROR,
	NEGATIVE_ERROR,
	ZERO_ERROR,
	NO_ERROR
};

private:

	static const std::string errorMessages[3];

	uint8_t performAddition(uint32_t *result, uint32_t firstOperand, uint32_t secondOperand);
	uint8_t performSubtraction(uint32_t *result, uint32_t firstOperand, uint32_t secondOperand);
	uint8_t performMultiplication(uint32_t *result, uint32_t firstOperand, uint32_t secondOperand);
	uint8_t performDivision(uint32_t *result, uint32_t firstOperand, uint32_t secondOperand);

	uint32_t parseHex(std::string &operand);
	uint32_t parseDec(std::string &operand);
	uint32_t parseBin(std::string &operand);

	void generateHex(std::string &str, uint32_t num);
	void generateDec(std::string &str, uint32_t num);
	void generateBin(std::string &str, uint32_t num);

	uint32_t parseOperand(std::string &operand);

public:

	void performCalculation(std::string& input, std::string& output);


};


#endif /* CALCENGINE_HPP_ */
